projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f616ed
)
magnav: Check for a valid creation time.
author
oliskoli
<oliskoli>
Sun, 7 Sep 2008 16:50:23 +0000
(16:50 +0000)
committer
oliskoli
<oliskoli>
Sun, 7 Sep 2008 16:50:23 +0000
(16:50 +0000)
magnav.c
patch
|
blob
|
history
diff --git
a/magnav.c
b/magnav.c
index d1e91d3c9f40e7f6116bea7e3002fac6bfbe0817..038cd8919b2e18909d8fe18a450c4dcb22e68b29 100644
(file)
--- a/
magnav.c
+++ b/
magnav.c
@@
-119,8
+119,8
@@
data_read(void)
tm.tm_mday = be_read16(&rec->crt_mday);
tm.tm_mon = be_read16(&rec->crt_mon) - 1;
tm.tm_year = be_read16(&rec->crt_year) - 1900;
- wpt_tmp->creation_time = mktime(&tm);
-
+ if (mkgmtime(&tm) > 0)
+ wpt_tmp->creation_time = mktime(&tm);
waypt_add(wpt_tmp);
}